package com.lc.user.express.view.dialog;

import android.content.Context;
import android.widget.TextView;

import com.lc.user.express.R;


/**
 * Created by Administrator on 2015/6/10.
 */
public abstract class AffirmDialog extends AppDialog {

    private TextView text;

    public AffirmDialog(Context context, String string, String no, String ok, int theme) {

        super(context, theme);
        addContent(R.layout.dialog_content_alert);
        text = (TextView) findViewById(R.id.alert_text);
        text.setText(string);
        addButton(new Button(no, "#5f5f5f") {
            @Override
            public void onClick() {
                dismiss();
            }

        }, new Button(ok, "#5f5f5f") {
            @Override
            public void onClick() {
                onYesClick();
                dismiss();
            }
        });
    }

    protected abstract void onYesClick();

}
